<?php

require_once APPLICATION_PATH.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'Component_Abstract.php';

class Accordion extends Component_Abstract  {

    private $_notes;
    
    public function setNotes($data) {
        $this->_notes=$data;
        return $this;
    }
    
    public function getNotes() {
        return $this->_notes;
    }

    public function initComponent() {

                $notes=array();

                if (!is_null($this->getParameter('selected_doc_gid'))) {

                    $tb = new Default_Model_Documents();
                    $notes=$tb->findByGroupId($this->getParameter('selected_doc_gid'));
                }

                $this->setNotes($notes);

    }


	public function show() {

            $ret=$this->getTmplContent($this->getConfig()->phtml->mainpage);
            return $ret;
	}

        public function demo() {
            $ret=$this->getTmplContent($this->getConfig()->phtml->demopage);
            return $ret;
        }

        public function getConfigPage() {
            return false;
        }

        public function getOptionsDiv() {
            $ret=$this->getTmplContent($this->getConfig()->phtml->optionspage);
            return $ret;
        }
}
